package com.zhuss.core.wrongWord;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import com.zhuss.bean.bo.core.wrongWord.DetailWrongWordBo;
import com.zhuss.bean.bo.core.wrongWord.SearchWrongWordBo;
import com.zhuss.common.ReadService;
import com.zhuss.core.processor.WrongWordRead;
import com.zhuss.exception.WpsException;

/**
 * @description: 敏感字查询Service
 * @author: zhushanshuo
 * @create: Fri Nov 20 13:10:22 CST 2020
 **/
@Component("wrongWordReadService")
public class WrongWordReadService implements ReadService<Object, Object> {
	
	@Autowired
	@Qualifier("wrongWordRead")
	private WrongWordRead wrongWordRead;
	
	/**
	 * 详情
	 */
	@Override
	public Object detail(Object param) throws WpsException {
		DetailWrongWordBo bo = (DetailWrongWordBo) param;
		Long wrongWordId = bo.getWrongWordId();
		Object vo = wrongWordRead.detail(wrongWordId);
		return vo;
	}
	
	/**
	 * 列表
	 */
	@Override
	public Object list(Object param) {
		SearchWrongWordBo bo = (SearchWrongWordBo) param;
		Object result = wrongWordRead.list(bo);
		return result;
	}
	
}

